package com.hua.store.dao;

import com.hua.store.domin.PageModel;
import com.hua.store.domin.Product;

import java.sql.SQLException;
import java.util.List;

public interface ProductDao {
    List<Product> getNewPro() throws SQLException;

    List<Product> getHotPro() throws SQLException;

    Product findProductByPid(String pid) throws SQLException;

    int findTotalProduct(String cid) throws SQLException;

    List findProductsByCidWithPage(String cid, int startIndex, int pageSize) throws SQLException;

    int findAllProduct() throws SQLException;

    List findAllProductWithPage(int startIndex, int pageSize) throws SQLException;

    void saveProduct(Product product) throws Exception;
}
